<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Matrix207&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="Matrix207's Blog">
<meta property="og:url" content="http://yoursite.com/page/10/index.html">
<meta property="og:site_name" content="Matrix207's Blog">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Matrix207's Blog">
  
    <link rel="alternate" href="/atom.xml" title="Matrix207&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Matrix207&#39;s Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="Flux RSS"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Rechercher"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-implement-web-server-with-c-in-linux" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/22/implement-web-server-with-c-in-linux/" class="article-date">
  <time datetime="2014-04-21T16:00:00.000Z" itemprop="datePublished">2014-04-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/22/implement-web-server-with-c-in-linux/">implement web server with c</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://blog.csdn.net/column/details/reage.html" target="_blank" rel="external">自己动手写web服务器</a></li>
<li><a href="http://www.oschina.net/code/snippet_12_15602" target="_blank" rel="external">单个 C 文件实现的 Web 服务器</a></li>
<li><a href="http://www.advancedlinuxprogramming.com/alp-folder/alp-ch11-sample-application.pdf" target="_blank" rel="external">web server of Advanced Linux Programming</a></li>
<li><a href="http://www.advancedlinuxprogramming.com/ALP-listings.tar.gz" target="_blank" rel="external">Advanced Linux Programming source code</a></li>
<li><a href="http://sourceforge.net/apps/trac/elpi/wiki/AlpASampleGNULinuxApplication" target="_blank" rel="external">web server of Advanced Linux Programming - chinese</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/22/implement-web-server-with-c-in-linux/" data-id="ciqqpe1ns007snmpv4cz1ukga" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-network-camera" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/22/network-camera/" class="article-date">
  <time datetime="2014-04-21T16:00:00.000Z" itemprop="datePublished">2014-04-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/22/network-camera/">network camera</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://download.csdn.net/download/wanchangjiu123/3134157" target="_blank" rel="external">linux下 网络摄像头监控系统 服务器端(bug:修改设备打开方式为读写)</a></li>
<li><a href="http://www.zoneminder.com/" target="_blank" rel="external">zone minder</a></li>
<li><a href="http://www.ibm.com/developerworks/cn/linux/l-mdst/" target="_blank" rel="external">Linux下的实时流媒体编程</a></li>
<li><a href="http://www.linuxsir.com/main/node/221" target="_blank" rel="external">摄像头（WebCam）在Linux中采用Spcaserv 架设网络视频监控服务器 (v0.1b)</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/22/network-camera/" data-id="ciqqpe1ny007vnmpvrqsxm512" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-capture-images-using-v4l2" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/19/capture-images-using-v4l2/" class="article-date">
  <time datetime="2014-04-18T16:00:00.000Z" itemprop="datePublished">2014-04-19</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/tools/">tools</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/19/capture-images-using-v4l2/">capture images using v4l2</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html" target="_blank" rel="external"><strong>video capture example</strong></a></li>
<li><a href="https://github.com/sensoray/drv-2226-linux/blob/master/capture.c" target="_blank" rel="external"><strong>capture.c</strong></a></li>
<li><a href="http://www.oschina.net/code/snippet_12_368" target="_blank" rel="external"><strong>video4linux2编程实例</strong></a></li>
<li><a href="https://gist.githubusercontent.com/Circuitsoft/1126411/raw/f8131727d3ff4526c4dc4ac2e20c188295e54f19/vidtest.c" target="_blank" rel="external">vidtest.c</a></li>
<li><a href="http://lwn.net/Articles/203924/" target="_blank" rel="external">The Video4Linux2 API: an introduction</a></li>
<li><a href="http://blog.csdn.net/d_south/article/details/4288836" target="_blank" rel="external">video4linux(v4l)使用摄像头的实例基础教程与体会</a></li>
<li><a href="http://blog.chinaunix.net/attachment/attach/20/54/36/7220543672a6e6f227f097f8db3fbe3f900c099717.pdf" target="_blank" rel="external">Video for Linux Two (V4L2) —— 驱动编写指南</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/19/capture-images-using-v4l2/" data-id="ciqqpe1nn007pnmpvbk1wdfdc" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/tools/">tools</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-linux-server-performance-tools" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/16/linux-server-performance-tools/" class="article-date">
  <time datetime="2014-04-15T16:00:00.000Z" itemprop="datePublished">2014-04-16</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/program/">program</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/16/linux-server-performance-tools/">linux server performance tools</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="web-server-performance-test-tools"><a href="#web-server-performance-test-tools" class="headerlink" title="web server performance test tools"></a>web server performance test tools</h3><ul>
<li><p>AB(Apache Bench) </p>
<p>  ab -r -k -n 100000 -c 500 url</p>
<p>  -r 表示遇到错误继续<br>  -k 表示keepalive<br>  -n 表示总共请求的次数<br>  -c 表示每次请求的数量（即并发数）<br>  url即要请求的地址</p>
</li>
</ul>
<p>以上命令表示请求总数达到10万后就停止</p>
<p>执行上面的命令前先使用ulimit -n 100000解除操作系统内的并发限制</p>
<pre><code>watch ab -r -k -n 100000 -c 500 url
</code></pre><p>watch命令会自动重复执行，每次执行时，自动间隔2秒</p>
<p>以上命令表示请求达到10万次后，自动休息2秒，然后重新请求</p>
<p>设置watch的间隔时间</p>
<pre><code>watch -d 3 ab -r -k -n 100000 -c 500 url
</code></pre><p>以上命令表示请求达到10万次后，自动休息3秒，然后重新请求 </p>
<ul>
<li><p>Nikto </p>
</li>
<li><p>piwik</p>
</li>
</ul>
<h3 id="linux-server-performance-monitors-tools"><a href="#linux-server-performance-monitors-tools" class="headerlink" title="linux server performance monitors tools"></a>linux server performance monitors tools</h3><ul>
<li><p>free -m </p>
</li>
<li><p>top , htop </p>
</li>
<li><p>ps </p>
</li>
<li><p>iostat </p>
</li>
<li><p>iftop </p>
</li>
</ul>
<h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://os.51cto.com/art/201205/337302.htm" target="_blank" rel="external">三大开源工具监控Apache Web服务器性能</a></li>
<li><a href="http://www.vpser.net/opt/webserver-test.html" target="_blank" rel="external">Web服务器性能/压力测试工具http_load、webbench、ab、Siege使用教程</a></li>
<li><a href="http://www.drupal001.com/2012/07/linux-server-monitor/" target="_blank" rel="external">Linux服务器性能追踪以及服务器监控常用命令</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/16/linux-server-performance-tools/" data-id="ciqqpe1nj007mnmpvel3o87em" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/performance/">performance</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-netfilter-hacking" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/14/netfilter-hacking/" class="article-date">
  <time datetime="2014-04-13T16:00:00.000Z" itemprop="datePublished">2014-04-14</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/14/netfilter-hacking/">netfilter hacking</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Netfilter-hacking"><a href="#Netfilter-hacking" class="headerlink" title="Netfilter hacking"></a>Netfilter hacking</h3><h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://www.netfilter.org/documentation/HOWTO/netfilter-hacking-HOWTO.html#toc3.3" target="_blank" rel="external">Netfilter hacking HOWTO</a></li>
<li><a href="http://inai.de/documents/Netfilter_Modules.pdf" target="_blank" rel="external">Write netfilter modules</a></li>
<li><a href="http://www.ibm.com/developerworks/cn/linux/l-ntflt/" target="_blank" rel="external">Linux Netfilter实现机制和扩展技术</a></li>
<li><a href="http://blog.chinaunix.net/uid-27064719-id-3503855.html" target="_blank" rel="external">十四 洞悉linux下的Netfilter&amp;iptables：开发一个match模块【实战】</a></li>
<li><a href="http://blog.ownlinux.net/2010/05/netfilter-kernel-source-code-intro.html" target="_blank" rel="external">Linux内核中的Netfilter介绍</a></li>
<li><a href="https://github.com/platinum-PT/xt_domain.git" target="_blank" rel="external">iptables domain filter</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/14/netfilter-hacking/" data-id="ciqqpe1nf007jnmpvqjfk3myz" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-how-to-implement-a-http-server-in-c-on-linux" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/14/how-to-implement-a-http-server-in-c-on-linux/" class="article-date">
  <time datetime="2014-04-13T16:00:00.000Z" itemprop="datePublished">2014-04-14</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/14/how-to-implement-a-http-server-in-c-on-linux/">how to implement a http server in c on linux</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="1-use-existing-open-source"><a href="#1-use-existing-open-source" class="headerlink" title="1.use existing open source"></a>1.use existing open source</h3><ul>
<li>Apache </li>
<li>Nginx</li>
</ul>
<h3 id="2-use-librarys"><a href="#2-use-librarys" class="headerlink" title="2.use librarys"></a>2.use librarys</h3><ul>
<li>Python HTTPServer / CGIHTTPServer</li>
<li>libevent</li>
</ul>
<h3 id="3-implement-it-in-c"><a href="#3-implement-it-in-c" class="headerlink" title="3.implement it in c"></a>3.implement it in c</h3><ul>
<li><p>basic (learn from APUE/UNP)<br>1.HTTP protocol(RFC 2616)<br>2.TCP server(select/poll/epoll)<br>3.multi-process model(fork, one proces per connection)<br>4.multi-thread model(one thread per connection)<br>5.IPC (interprocess communication)<br>6.NON-Block I/O, edge trigger  </p>
</li>
<li><p>advanced (learn from open source, lots pagers)<br>1.performance optimists: memory cached, I/O(linux AIO), TCP/IP<br>2.support CGI/FastCGI/WSGI/AJK<br>3.support HTTPS<br>4.dynamic modules<br>5.support cluster  </p>
</li>
</ul>
<h3 id="4-Reference"><a href="#4-Reference" class="headerlink" title="4.Reference"></a>4.Reference</h3><ul>
<li>[1]<a href="http://www.zhihu.com/question/20199473" target="_blank" rel="external">实现一个http服务器需要怎样进行？需要哪些知识呢</a></li>
<li>[2]<a href="http://stackoverflow.com/questions/2338775/how-do-i-write-a-web-server-in-c-on-linux" target="_blank" rel="external">how-do-i-write-a-web-server-in-c-on-linux</a></li>
<li>[3]<a href="http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers" target="_blank" rel="external">Comparison of lightweight web servers</a></li>
<li>[4]<a href="http://www.ruilog.com/article/view/5249.html" target="_blank" rel="external">libevent webserver in 40 lines of c</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/14/how-to-implement-a-http-server-in-c-on-linux/" data-id="ciqqpe1nb007gnmpv2p7cgjnv" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-how-to-write-a-good-web-server" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/12/how-to-write-a-good-web-server/" class="article-date">
  <time datetime="2014-04-11T16:00:00.000Z" itemprop="datePublished">2014-04-12</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/12/how-to-write-a-good-web-server/">how to write a good web server</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Server-module"><a href="#Server-module" class="headerlink" title="Server module"></a>Server module</h3><ul>
<li>1.<strong>select</strong> based server<br>  Advantage:  easy to implement<br>  disadvantage: limit to fd, max is 1024 on most linux  </li>
<li>2.<strong>/dev/poll</strong> based server<br>  Advantage:<br>  disadvantage: same to select  </li>
<li>3.<strong>epoll</strong> based server<br>  Advantage: fastly, not need to check each fd.<br>  disadvantage: do more coding  </li>
<li>4.<strong>thread</strong> based server<br>  Advantage: cheap to create, easy to share memory<br>  disadvantage: instability, crash thread make entry process down because all<pre><code>threads share the same addres space.  
</code></pre></li>
<li>5.<strong>process</strong> based server<br>  Advantage: stable, crash process do not effect others.<br>  disadvantage: create and kill processs overhead the web server.  </li>
<li>6.<strong>hybrid process thread</strong> server<br>  Advantage:<br>  disadvantage:  </li>
<li>7.<strong>process-pool</strong> and <strong>thread-pool</strong> based server<br>  process pool, reference<br>  <a href="http://stackoverflow.com/questions/16286208/dynamic-pool-of-processes" target="_blank" rel="external">dynamic-pool-of-processes</a><br>  <a href="http://www.devshed.com/c/a/Administration/Design-and-Architecture/3/" target="_blank" rel="external">Preforking: Process Pools</a><br>  <a href="http://blog.chinaunix.net/uid-20481436-id-1941519.html" target="_blank" rel="external">3</a><br>  Advantage:<br>  disadvantage:  </li>
<li>8.<strong>event</strong> based server<br>  Advantage:<br>  disadvantage:  </li>
</ul>
<h3 id="Biggest-performance-killers"><a href="#Biggest-performance-killers" class="headerlink" title="Biggest performance-killers"></a>Biggest performance-killers</h3><ul>
<li>1.Data copies  </li>
<li>2.Context switches  </li>
<li>3.Memory allocation  </li>
<li>4.Lock contention  </li>
</ul>
<h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://www.kegel.com/c10k.html#examples.nb.select" target="_blank" rel="external"><strong>The C10K problem</strong></a></li>
<li><a href="http://bulk.fefe.de/scalable-networking.pdf" target="_blank" rel="external"><strong>Scalable Network Programming</strong></a></li>
<li><a href="http://pl.atyp.us/content/tech/servers.html" target="_blank" rel="external">High performance server architecture</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers" target="_blank" rel="external">Comparison of web server software</a></li>
<li><a href="https://code.google.com/p/mongoose" target="_blank" rel="external">mongoose - easy to use web server</a></li>
<li><a href="http://edsiper.linuxchile.cl/blog/2013/02/27/architecture-of-a-linux-based-web-server/" target="_blank" rel="external">Architecture of a Linux based Web Server - Monkey HTTP server</a></li>
<li><a href="https://github.com/monkey/monkey" target="_blank" rel="external">Monkey HTTP server</a></li>
<li><a href="http://blog.abhijeetr.com/2010/04/very-simple-http-server-writen-in-c.html" target="_blank" rel="external">A very simple HTTP server writen in c</a></li>
<li><a href="https://github.com/ashishc/Http-Server#!" target="_blank" rel="external">HTTP-server</a></li>
<li><a href="http://stackoverflow.com/questions/2338775/how-do-i-write-a-web-server-in-c-on-linux" target="_blank" rel="external">How do I write a web server in C on linux</a></li>
<li><a href="https://github.com/search?l=C&amp;q=webserver&amp;ref=cmdform&amp;type=Repositories" target="_blank" rel="external">webserver search on github</a></li>
<li><a href="http://jakash3.wordpress.com/2011/03/08/simple-webserver-for-linux/" target="_blank" rel="external">simple webserver for linux</a></li>
<li><a href="http://sce.umkc.edu/~leeyu/class/cs551-04/papers/noshaba.pdf" target="_blank" rel="external">Web server software architectures</a></li>
<li><a href="https://github.com/lyjdamzwf/chaos" target="_blank" rel="external">chaos - c++ network event library</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/12/how-to-write-a-good-web-server/" data-id="ciqqpe1n3007anmpvq6w7re2n" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-nas-storage-system-performance-optimization" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/12/nas-storage-system-performance-optimization/" class="article-date">
  <time datetime="2014-04-11T16:00:00.000Z" itemprop="datePublished">2014-04-12</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/storage/">storage</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/12/nas-storage-system-performance-optimization/">NAS storage system performance optimization</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="NAS"><a href="#NAS" class="headerlink" title="NAS"></a>NAS</h3><p>Network attach storage, there are two protocol NFS(Linux) and CIFS(windows)</p>
<h3 id="NFS"><a href="#NFS" class="headerlink" title="NFS"></a>NFS</h3><p>1.use UDP or TCP<br>2.modify rsize and wsize<br>3.use sync or async  </p>
<h3 id="CIFS"><a href="#CIFS" class="headerlink" title="CIFS"></a>CIFS</h3><p>1.smb or smb2<br>2.modify rsize and wsize<br>3.prefetch  </p>
<h3 id="Tools"><a href="#Tools" class="headerlink" title="Tools"></a>Tools</h3><p>Watch the memory,disk I/O and net speed.<br>1.vmstat<br>2.cat /proc/cpuinfo, /proc/meminfo, /proc/net/dev  </p>
<h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="http://www.huawei.com/ecommunity/bbs/10167439.html" target="_blank" rel="external">存储课堂:NAS存储系统性能优化攻略</a></li>
<li><a href="https://calomel.org/samba_optimize.html" target="_blank" rel="external">samba optimization and speed tuning for performance</a></li>
<li><a href="https://wiki.amahi.org/index.php/Make_Samba_Go_Faster" target="_blank" rel="external">make samba go faster</a></li>
<li><a href="http://niyunjiu.iteye.com/blog/661141" target="_blank" rel="external">samba性能调优</a></li>
<li><a href="http://wisebyte.blogspot.com/2014/02/mavericks-nfs-vs-smb-implementation.html" target="_blank" rel="external">Mavericks NFS vs SMB Implementation - Speed Test</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/12/nas-storage-system-performance-optimization/" data-id="ciqqpe1n7007dnmpv4wfqmvth" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/storage/">storage</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-epoll-example-in-c" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/10/epoll-example-in-c/" class="article-date">
  <time datetime="2014-04-09T16:00:00.000Z" itemprop="datePublished">2014-04-10</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/language/">language</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/10/epoll-example-in-c/">epoll example in c</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="difference-between-slect-poll-and-epoll"><a href="#difference-between-slect-poll-and-epoll" class="headerlink" title="difference between slect poll and epoll"></a>difference between slect poll and epoll</h3><p>There are other reasons to avoid select and use epoll. When using select, you<br>don’t know how many descriptors need attention. So you must keep track of the<br>biggest and loop to it.</p>
<pre><code>rc = select(...);
/* check rc */
for (s = 0; s &lt;= maxfd; s++) {
    if (FD_ISSET(s)) {
        /* ... */
    }
}
</code></pre><p>Now with epoll it’s a lot cleaner:</p>
<pre><code>nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);
/* check nfds */
for (n = 0; n &lt; nfds; ++n) {
    /* events[n].data.fd needs attention */
}
</code></pre><h3 id="do-fork-process-before-create-epoll"><a href="#do-fork-process-before-create-epoll" class="headerlink" title="do fork process before create_epoll"></a>do fork process before create_epoll</h3><h3 id="Epoll-example-in-C"><a href="#Epoll-example-in-C" class="headerlink" title="Epoll example in C"></a>Epoll example in C</h3><pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/socket.h&gt;
#include &lt;netdb.h&gt;
#include &lt;unistd.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;sys/epoll.h&gt;
#include &lt;errno.h&gt;

#define MAXEVENTS 64

static int
make_socket_non_blocking (int sfd)
{
    int flags, s;

    flags = fcntl (sfd, F_GETFL, 0);
    if (flags == -1)
    {
        perror (&quot;fcntl&quot;);
        return -1;
    }

    flags |= O_NONBLOCK;
    s = fcntl (sfd, F_SETFL, flags);
    if (s == -1)
    {
        perror (&quot;fcntl&quot;);
        return -1;
    }

    return 0;
}

static int
create_and_bind (char *port)
{
    struct addrinfo hints;
    struct addrinfo *result, *rp;
    int s, sfd;

    memset (&amp;hints, 0, sizeof (struct addrinfo));
    hints.ai_family = AF_UNSPEC;     /* Return IPv4 and IPv6 choices */
    hints.ai_socktype = SOCK_STREAM; /* We want a TCP socket */
    hints.ai_flags = AI_PASSIVE;     /* All interfaces */

    s = getaddrinfo (NULL, port, &amp;hints, &amp;result);
    if (s != 0)
    {
        fprintf (stderr, &quot;getaddrinfo: %s\n&quot;, gai_strerror (s));
        return -1;
    }

    for (rp = result; rp != NULL; rp = rp-&gt;ai_next)
    {
        sfd = socket (rp-&gt;ai_family, rp-&gt;ai_socktype, rp-&gt;ai_protocol);
        if (sfd == -1)
            continue;

        s = bind (sfd, rp-&gt;ai_addr, rp-&gt;ai_addrlen);
        if (s == 0)
        {
            /* We managed to bind successfully! */
            break;
        }

        close (sfd);
    }

    if (rp == NULL)
    {
        fprintf (stderr, &quot;Could not bind\n&quot;);
        return -1;
    }

    freeaddrinfo (result);

    return sfd;
}

int
main (int argc, char *argv[])
{
    int sfd, s;
    int efd;
    struct epoll_event event;
    struct epoll_event *events;

    if (argc != 2)
    {
        fprintf (stderr, &quot;Usage: %s [port]\n&quot;, argv[0]);
        exit (EXIT_FAILURE);
    }

    sfd = create_and_bind (argv[1]);
    if (sfd == -1)
        abort ();

    s = make_socket_non_blocking (sfd);
    if (s == -1)
        abort ();

    s = listen (sfd, SOMAXCONN);
    if (s == -1)
    {
        perror (&quot;listen&quot;);
        abort ();
    }

    efd = epoll_create1 (0);
    if (efd == -1)
    {
        perror (&quot;epoll_create&quot;);
        abort ();
    }

    event.data.fd = sfd;
    event.events = EPOLLIN | EPOLLET;
    s = epoll_ctl (efd, EPOLL_CTL_ADD, sfd, &amp;event);
    if (s == -1)
    {
        perror (&quot;epoll_ctl&quot;);
        abort ();
    }

    /* Buffer where events are returned */
    events = calloc (MAXEVENTS, sizeof event);

    /* The event loop */
    while (1)
    {
        int n, i;

        n = epoll_wait (efd, events, MAXEVENTS, -1);
        for (i = 0; i &lt; n; i++)
        {
            if ((events[i].events &amp; EPOLLERR) ||
                    (events[i].events &amp; EPOLLHUP) ||
                    (!(events[i].events &amp; EPOLLIN)))
            {
                /* An error has occured on this fd, or the socket is not
                   ready for reading (why were we notified then?) */
                fprintf (stderr, &quot;epoll error\n&quot;);
                close (events[i].data.fd);
                continue;
            }

            else if (sfd == events[i].data.fd)
            {
                /* We have a notification on the listening socket, which
                   means one or more incoming connections. */
                while (1)
                {
                    struct sockaddr in_addr;
                    socklen_t in_len;
                    int infd;
                    char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];

                    in_len = sizeof in_addr;
                    infd = accept (sfd, &amp;in_addr, &amp;in_len);
                    if (infd == -1)
                    {
                        if ((errno == EAGAIN) ||
                                (errno == EWOULDBLOCK))
                        {
                            /* We have processed all incoming
                               connections. */
                            break;
                        }
                        else
                        {
                            perror (&quot;accept&quot;);
                            break;
                        }
                    }

                    s = getnameinfo (&amp;in_addr, in_len,
                            hbuf, sizeof hbuf,
                            sbuf, sizeof sbuf,
                            NI_NUMERICHOST | NI_NUMERICSERV);
                    if (s == 0)
                    {
                        printf(&quot;Accepted connection on descriptor %d &quot;
                                &quot;(host=%s, port=%s)\n&quot;, infd, hbuf, sbuf);
                    }

                    /* Make the incoming socket non-blocking and add it to the
                       list of fds to monitor. */
                    s = make_socket_non_blocking (infd);
                    if (s == -1)
                        abort ();

                    event.data.fd = infd;
                    event.events = EPOLLIN | EPOLLET;
                    s = epoll_ctl (efd, EPOLL_CTL_ADD, infd, &amp;event);
                    if (s == -1)
                    {
                        perror (&quot;epoll_ctl&quot;);
                        abort ();
                    }
                }
                continue;
            }
            else
            {
                /* We have data on the fd waiting to be read. Read and
                   display it. We must read whatever data is available
                   completely, as we are running in edge-triggered mode
                   and won&apos;t get a notification again for the same
                   data. */
                int done = 0;

                while (1)
                {
                    ssize_t count;
                    char buf[512];

                    count = read (events[i].data.fd, buf, sizeof buf);
                    if (count == -1)
                    {
                        /* If errno == EAGAIN, that means we have read all
                           data. So go back to the main loop. */
                        if (errno != EAGAIN)
                        {
                            perror (&quot;read&quot;);
                            done = 1;
                        }
                        break;
                    }
                    else if (count == 0)
                    {
                        /* End of file. The remote has closed the
                           connection. */
                        done = 1;
                        break;
                    }

                    /* Write the buffer to standard output */
                    s = write (1, buf, count);
                    if (s == -1)
                    {
                        perror (&quot;write&quot;);
                        abort ();
                    }
                }

                if (done)
                {
                    printf (&quot;Closed connection on descriptor %d\n&quot;,
                            events[i].data.fd);

                    /* Closing the descriptor will make epoll remove it
                       from the set of descriptors which are monitored. */
                    close (events[i].data.fd);
                }
            }
        }
    }

    free (events);

    close (sfd);

    return EXIT_SUCCESS;
}
</code></pre><h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="https://banu.com/blog/2/how-to-use-epoll-a-complete-example-in-c/" target="_blank" rel="external">How to use epoll? A complete example in C</a></li>
<li><a href="http://stackoverflow.com/questions/6474602/does-epoll-do-its-job-in-o1" target="_blank" rel="external">Does epoll(), do its job in O(1)?</a></li>
<li><a href="http://www.cppblog.com/converse/archive/2008/10/08/63504.html" target="_blank" rel="external">多进程服务器中,epoll的创建应该在创建子进程之后</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/10/epoll-example-in-c/" data-id="ciqqpe1mv0077nmpvj1z1qphp" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/c/">c</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-search-tips-and-tricks" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/04/04/search-tips-and-tricks/" class="article-date">
  <time datetime="2014-04-03T16:00:00.000Z" itemprop="datePublished">2014-04-04</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/others/">others</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2014/04/04/search-tips-and-tricks/">search tips and tricks</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Tips"><a href="#Tips" class="headerlink" title="Tips"></a>Tips</h3><ul>
<li><p>search with specific site<br>Precede your query with site: if you know you want your answer from within a<br>specific site or type of site (.org, .edu). For example: site:edu or<br>site:nytimes.com. </p>
<p>  op-ed site:nytimes.com    </p>
</li>
<li><p>search by file type<br>Search for specific types of files, such as PDFs, PPTs, or XLS, by adding<br>filetype: and the 3-letter file abbreviation. </p>
<p>  affordable health care act filetype:ppt    </p>
</li>
<li><p>get definition<br>put define: in front of any word to get its definition.</p>
<p>  define: loquaciousness</p>
</li>
</ul>
<h3 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h3><ul>
<li><a href="https://www.google.com/insidesearch/tipstricks/all.html" target="_blank" rel="external">googl search tips and tricks</a></li>
<li><a href="https://www.google.com/intl/zh-CN/insidesearch/tipstricks/all.html" target="_blank" rel="external">googl search tips and tricks–chinese</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/04/04/search-tips-and-tricks/" data-id="ciqqpe1mr0074nmpv7w1zwq3k" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/google/">google</a></li></ul>

    </footer>
  </div>
  
</article>


  


  <nav id="page-nav">
    <a class="extend prev" rel="prev" href="/page/9/">&laquo; __('prev')</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/8/">8</a><a class="page-number" href="/page/9/">9</a><span class="page-number current">10</span><a class="page-number" href="/page/11/">11</a><a class="page-number" href="/page/12/">12</a><span class="space">&hellip;</span><a class="page-number" href="/page/18/">18</a><a class="extend next" rel="next" href="/page/11/">__('next') &raquo;</a>
  </nav>
</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Catégories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/blog/">blog</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/english/">english</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kernel/">kernel</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/language/">language</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/math/">math</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/network/">network</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/others/">others</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/person/">person</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/program/">program</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/source/">source</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/storage/">storage</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/tools/">tools</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/windows/">windows</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Mot-clés</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/FAQ/">FAQ</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/IRC/">IRC</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Translation/">Translation</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/">android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/api/">api</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/assembly/">assembly</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/awk/">awk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/batch/">batch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/blog/">blog</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/book/">book</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/crash/">crash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/debug/">debug</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dot/">dot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/driver/">driver</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/emacs/">emacs</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/exploit/">exploit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/file-system/">file system</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/filesystem/">filesystem</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flowchart/">flowchart</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gcc/">gcc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/google/">google</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/graphviz/">graphviz</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hosts/">hosts</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iscsi/">iscsi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javascript/">javascript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/job/">job</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/json/">json</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kernel/">kernel</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lisp/">lisp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lua/">lua</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/makefile/">makefile</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/malloc/">malloc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/math/">math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/maxima/">maxima</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory/">memory</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory-overflow/">memory overflow</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mtrace/">mtrace</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netdisk/">netdisk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/network/">network</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/others/">others</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/pandoc/">pandoc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/performance/">performance</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/person/">person</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rsync/">rsync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sed/">sed</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shell/">shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/skype/">skype</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sms/">sms</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/source/">source</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ssh/">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/stack/">stack</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/storage/">storage</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/study/">study</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/svn/">svn</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sync/">sync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/time/">time</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tools/">tools</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/valgrind/">valgrind</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vi/">vi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/virtual/">virtual</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wget/">wget</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/windows/">windows</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wireshark/">wireshark</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/write/">write</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xml/">xml</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Nuage de mot-clés</h3>
    <div class="widget tagcloud">
      <a href="/tags/FAQ/" style="font-size: 10px;">FAQ</a> <a href="/tags/IRC/" style="font-size: 10px;">IRC</a> <a href="/tags/Translation/" style="font-size: 13px;">Translation</a> <a href="/tags/android/" style="font-size: 10px;">android</a> <a href="/tags/api/" style="font-size: 10px;">api</a> <a href="/tags/assembly/" style="font-size: 10px;">assembly</a> <a href="/tags/awk/" style="font-size: 11px;">awk</a> <a href="/tags/batch/" style="font-size: 14px;">batch</a> <a href="/tags/blog/" style="font-size: 10px;">blog</a> <a href="/tags/book/" style="font-size: 10px;">book</a> <a href="/tags/c/" style="font-size: 16px;">c</a> <a href="/tags/c/" style="font-size: 19px;">c++</a> <a href="/tags/cache/" style="font-size: 10px;">cache</a> <a href="/tags/crash/" style="font-size: 10px;">crash</a> <a href="/tags/database/" style="font-size: 17px;">database</a> <a href="/tags/debug/" style="font-size: 12px;">debug</a> <a href="/tags/dot/" style="font-size: 10px;">dot</a> <a href="/tags/driver/" style="font-size: 10px;">driver</a> <a href="/tags/emacs/" style="font-size: 11px;">emacs</a> <a href="/tags/exploit/" style="font-size: 10px;">exploit</a> <a href="/tags/file-system/" style="font-size: 10px;">file system</a> <a href="/tags/filesystem/" style="font-size: 12px;">filesystem</a> <a href="/tags/flowchart/" style="font-size: 10px;">flowchart</a> <a href="/tags/gcc/" style="font-size: 10px;">gcc</a> <a href="/tags/git/" style="font-size: 12px;">git</a> <a href="/tags/google/" style="font-size: 11px;">google</a> <a href="/tags/graphviz/" style="font-size: 11px;">graphviz</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/hosts/" style="font-size: 10px;">hosts</a> <a href="/tags/iscsi/" style="font-size: 14px;">iscsi</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 10px;">javascript</a> <a href="/tags/job/" style="font-size: 10px;">job</a> <a href="/tags/json/" style="font-size: 10px;">json</a> <a href="/tags/kernel/" style="font-size: 14px;">kernel</a> <a href="/tags/linux/" style="font-size: 14px;">linux</a> <a href="/tags/lisp/" style="font-size: 10px;">lisp</a> <a href="/tags/lua/" style="font-size: 10px;">lua</a> <a href="/tags/makefile/" style="font-size: 10px;">makefile</a> <a href="/tags/malloc/" style="font-size: 10px;">malloc</a> <a href="/tags/math/" style="font-size: 11px;">math</a> <a href="/tags/maxima/" style="font-size: 10px;">maxima</a> <a href="/tags/memory/" style="font-size: 11px;">memory</a> <a href="/tags/memory-overflow/" style="font-size: 10px;">memory overflow</a> <a href="/tags/mtrace/" style="font-size: 10px;">mtrace</a> <a href="/tags/netdisk/" style="font-size: 10px;">netdisk</a> <a href="/tags/network/" style="font-size: 20px;">network</a> <a href="/tags/others/" style="font-size: 18px;">others</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a> <a href="/tags/performance/" style="font-size: 16px;">performance</a> <a href="/tags/person/" style="font-size: 11px;">person</a> <a href="/tags/protobuf/" style="font-size: 11px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/rsync/" style="font-size: 10px;">rsync</a> <a href="/tags/sed/" style="font-size: 11px;">sed</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/skype/" style="font-size: 11px;">skype</a> <a href="/tags/sms/" style="font-size: 10px;">sms</a> <a href="/tags/source/" style="font-size: 11px;">source</a> <a href="/tags/ssh/" style="font-size: 10px;">ssh</a> <a href="/tags/stack/" style="font-size: 10px;">stack</a> <a href="/tags/storage/" style="font-size: 15px;">storage</a> <a href="/tags/study/" style="font-size: 10px;">study</a> <a href="/tags/svn/" style="font-size: 11px;">svn</a> <a href="/tags/sync/" style="font-size: 10px;">sync</a> <a href="/tags/test/" style="font-size: 11px;">test</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/tools/" style="font-size: 16px;">tools</a> <a href="/tags/valgrind/" style="font-size: 10px;">valgrind</a> <a href="/tags/vi/" style="font-size: 10px;">vi</a> <a href="/tags/vim/" style="font-size: 14px;">vim</a> <a href="/tags/virtual/" style="font-size: 11px;">virtual</a> <a href="/tags/wget/" style="font-size: 10px;">wget</a> <a href="/tags/windows/" style="font-size: 11px;">windows</a> <a href="/tags/wireshark/" style="font-size: 10px;">wireshark</a> <a href="/tags/write/" style="font-size: 13px;">write</a> <a href="/tags/xml/" style="font-size: 10px;">xml</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">July 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">April 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/07/">July 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">June 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">January 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/12/">December 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/11/">November 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/09/">September 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/08/">August 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">July 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">June 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/05/">May 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/03/">March 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/11/">November 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">October 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/09/">September 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/08/">August 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/07/">July 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">June 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/05/">May 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/04/">April 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/03/">March 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/02/">February 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/01/">January 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/12/">December 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/09/">September 2012</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Articles récents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/07/17/how-to-implement-malloc/">如何实现一个malloc</a>
          </li>
        
          <li>
            <a href="/2016/07/17/study-grep-more/">grep工作原理</a>
          </li>
        
          <li>
            <a href="/2016/07/17/2016-04-13-malloc/">malloc</a>
          </li>
        
          <li>
            <a href="/2016/04/27/include-what-you-use/">使用IWYU整理头文件引用</a>
          </li>
        
          <li>
            <a href="/2016/04/24/understand-gcc-assembly-output/">understand gcc assembly output</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 Matrix207<br>
      Propulsé by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>